package com.study;
/*
*   家具类
*   定义成员变量（public 和privite）： name  color  price(封装)
*   定义成员方法： description()   //我是一个家具
* */
public class Furniture {
    public String name ;
    public String color ;
    private double price ;
    private int leg = 4;
    public Furniture(){};
    public Furniture(String name,String color ){
        this.name = name;
        this.color = color;
    }

    public String description (){
        double newPrice = this.getPrice() * 0.85;
        return "我是一个" + this.name + this.leg ;
    };
    public void setPrice(double price){
        this.price = price;
    };
    public double getPrice( ){
        return this.price;

    }


}
